package demo2;

class Base {
    Z z = new Z();

    static {
        System.out.println("static base");
    }

    public Base(String s) {
        System.out.print("B");
    }
}

public class Derived extends Base {
    static {
        System.out.println("static derived");
    }

    Z z = new Z();

    public Derived(String s) {
        super(s);
      System.out.println(111);
    }

    public static void main(String[] args) {
        new Derived("C");
    }
}

class Z {
    public Z() {
        System.out.println("Z");
    }
}

